package com.rs.game.player.dialogues;

import com.rs.game.WorldTile;
import com.rs.game.npc.others.Bork;
import com.rs.game.player.Skills;
import com.rs.game.player.content.Magic;

public class Bossing extends Dialogue {

	public void start() {
		sendOptionsDialogue("Boss Teleports", "Kalphite Queen", "Corporeal Beast", "King Black Dragon", "Queen Black Dragon", "More");
	}

	public void run(int interfaceId, int componentId) {
		switch (stage) {
		case -1:
			switch (componentId) {
			case OPTION_1: // KQ
				Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(3507, 9493, 0));
				break;
			case OPTION_2: // Corp
				Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(2966, 4383, 2));
				break;
			case OPTION_3: // KBD
				Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(3069, 10255, 0));
				player.getControlerManager().startControler("Wilderness");
				break;
			case OPTION_4: // QBD
				if (player.getSkills().getLevelForXp(Skills.SUMMONING) < 60) {
					player.getPackets().sendGameMessage("You need a summoning level of 60 to go through this portal.");
					return;
				}
				player.getControlerManager().startControler("QueenBlackDragonControler");
				end();
				break;
			case OPTION_5: // More
				sendOptionsDialogue("Bossing Teleports", "Godwars", "Bork", "Dagannoth Kings", "Tormented Demons", "Back");
				stage = 0;
			}
			break;
		case 0:
			switch (componentId) {
			case OPTION_1:
				sendOptionsDialogue("Godwars", "Nex", "Bandos", "Armadyl", "Saradomin", "Zamorak");
				stage = 1;
				break;
			case OPTION_2:
				end();
				if (Bork.deadTime > System.currentTimeMillis()) {
					player.getPackets().sendGameMessage(Bork.convertToTime());
					return;
				}
				player.getControlerManager().startControler("BorkControler", 0, null);
				break;
			case OPTION_3:
				Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(1909, 4367, 0));
				break;
			case OPTION_4:
				Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(2571, 5734, 0));
				break;
			case OPTION_5:
				sendDialogue("Bossing");
			break;
		case 1:
			switch (componentId) {
			case OPTION_1: // Nex
				Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(2904, 5203, 0));
				break;
			case OPTION_2: // Bandos
				Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(2870, 5363, 0));
				break;
			case OPTION_3: // Armadyl
				Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(2838, 5297, 0));
				break;
			case OPTION_4: // Saradomin
				Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(2923, 5247, 0));
				break;
			case OPTION_5: // Zamorak
				Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(2925, 5330, 0));
				break;
			}
			break;
			}
		}
	}

	public void finish() {
	}
}